package com.loan.system.create.service.impl;

import java.util.List;
import com.loan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.loan.system.create.mapper.AssistPdfTableConfMapper;
import com.loan.system.create.domain.AssistPdfTableConf;
import com.loan.system.create.service.IAssistPdfTableConfService;

/**
 * PDF表格配置Service业务层处理
 * 
 * @author Sophia
 * @date 2024-07-04
 */
@Service
public class AssistPdfTableConfServiceImpl implements IAssistPdfTableConfService 
{
    @Autowired
    private AssistPdfTableConfMapper assistPdfTableConfMapper;

    /**
     * 查询PDF表格配置
     * 
     * @param id PDF表格配置主键
     * @return PDF表格配置
     */
    @Override
    public AssistPdfTableConf selectAssistPdfTableConfById(Long id)
    {
        return assistPdfTableConfMapper.selectAssistPdfTableConfById(id);
    }

    /**
     * 查询PDF表格配置列表
     * 
     * @param assistPdfTableConf PDF表格配置
     * @return PDF表格配置
     */
    @Override
    public List<AssistPdfTableConf> selectAssistPdfTableConfList(AssistPdfTableConf assistPdfTableConf)
    {
        return assistPdfTableConfMapper.selectAssistPdfTableConfList(assistPdfTableConf);
    }

    /**
     * 新增PDF表格配置
     * 
     * @param assistPdfTableConf PDF表格配置
     * @return 结果
     */
    @Override
    public int insertAssistPdfTableConf(AssistPdfTableConf assistPdfTableConf)
    {
        assistPdfTableConf.setCreateTime(DateUtils.getNowDate());
        return assistPdfTableConfMapper.insertAssistPdfTableConf(assistPdfTableConf);
    }

    /**
     * 修改PDF表格配置
     * 
     * @param assistPdfTableConf PDF表格配置
     * @return 结果
     */
    @Override
    public int updateAssistPdfTableConf(AssistPdfTableConf assistPdfTableConf)
    {
        assistPdfTableConf.setUpdateTime(DateUtils.getNowDate());
        return assistPdfTableConfMapper.updateAssistPdfTableConf(assistPdfTableConf);
    }

    /**
     * 批量删除PDF表格配置
     * 
     * @param ids 需要删除的PDF表格配置主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfTableConfByIds(Long[] ids)
    {
        return assistPdfTableConfMapper.deleteAssistPdfTableConfByIds(ids);
    }

    /**
     * 删除PDF表格配置信息
     * 
     * @param id PDF表格配置主键
     * @return 结果
     */
    @Override
    public int deleteAssistPdfTableConfById(Long id)
    {
        return assistPdfTableConfMapper.deleteAssistPdfTableConfById(id);
    }
}
